% Funtion to estimate the thrust available for a subsonic aircraft
%Thrust is a functon of speed and also a function of air density (or
% altitude)
%
% Programmer: A. Trani
% Sept. 15, 2004

% Output:
% thrust                 = total thrust (N) accounting for installation

% Inputs:
% true_mach         = true mach number (dimensionless)
% density             = air density (kg/cu. meter)
% mach_table        = table of mach numbers for thrust competition
% ttable                = table with thrust values (N)
% lapse_rate        = thrust lapse rate with altitude (dim)

function [thrust] = thrust_calculationNoLoss(ttable,mach_table,lapse_rate,true_mach,density)

global neng rhos
global mass thrust_table mach_table lapse_rate_factor 

rhos = 1.225;               % density at sea level

installation_losses_factor = 1.0;      % factor to account for installation losses and conversion to maximum 
                                                     % continuous climb rating thrust
%true_mach
tmach =  neng * interp1 (mach_table, ttable, true_mach) .* installation_losses_factor;
thrust = tmach .* (density ./  rhos) .^ lapse_rate;